﻿<div id="mtop_left">
                                	<ul>
                                    	<li class="icon_menu"><img src="<?=url_tmpl()?>icon/home-icon.png" width="14" height="14" /></li>
                                    	<li class="text_menu"><a title="" href="<?=base_url()?>home<?=url_suffix()?>">Trang chủ</a></li>
                                        <li class="icon_menu"><img src="<?=url_tmpl()?>icon/About-icon.png" width="14" height="14" /></li>
                                        <li class="text_menu"><a title="" href="<?=base_url()?>gioi-thieu<?=url_suffix()?>">Giới thiệu</a></li>
                                        <!--<li class="icon_menu"><img src="<?=url_tmpl()?>icon/lienhe.png" width="14" height="14" /></li>
                                        <li class="text_menu"><a title="" href="<?=base_url()?>lien-he<?=url_suffix()?>">Liên hệ</a></li>-->
                                        <li class="icon_menu"><img src="<?=url_tmpl()?>icon/Add-icon.png" width="14" height="14" /></li>
                                        <li class="text_menu"><a title="" href="<?=base_url()?>huong-dan<?=url_suffix()?>">Hướng dẫn</a></li>
                                    </ul>
                                </div>
                                <div id="mtop_right">
                                	<ul>
                                    <?php if(empty($datas["email"])):?>
                                    	<li class="icon_menu" style="margin-left:5px;"><a title="" href="<?=base_url()?>thanh-vien<?=url_suffix()?>">Đăng tin</a></li>
                                    	<li style="width:30px;"><img src="<?=url_tmpl()?>icon/add-2-icon.png" width="12" height="12" /></li>
                                        <li style="margin-left:5px;"><a title="" href="<?=base_url()?>thanh-vien/dangnhap<?=url_suffix()?>">Đăng nhập</a></li>
                                        <li style="width:30px;"><img src="<?=url_tmpl()?>icon/login.png" width="16" height="16" /></li>
                                        <li style="margin-left:5px;"><a title="" href="<?=base_url()?>thanh-vien/dangky<?=url_suffix()?>">Đăng ký</a></li>
                                        <li style="width:30px;"><img src="<?=url_tmpl()?>icon/key-icon.png" width="14" height="14" /></li>
                                    <?php else:?>
                                    	<li  style="width:80px; margin-top:2px; margin-left:10px; ">
                                        	<div style="float:left; margin-right:6px;"><img src="<?=url_tmpl()?>icon/setting.png" width="13" height="13" /></div>
                                            <div style="float:left;margin-top:-1px;"><a href="login" class="signin"><span>Chức năng</span></a></div>
                                            <fieldset class="dialog caidat" id="signin_menu">
                                                 <div class="topdangtin">
                                                 	<div class="topdangtin_t">&nbsp;</div>
                                                    <div class="topdangtin_c">
                                                    	<div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Thông tin cá nhân</a></div>
                                                        </div>
                                                        <div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Thay đổi mật khẩu</a></div>
                                                        </div>
                                                        <div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Thoát</a></div>
                                                        </div>
                                                        <div id="both"></div>
                                                    </div>
                                                    <div class="topdangtin_u"></div>
                                                 </div>
                                            </fieldset>  
                                        </li>
                                        <li style="width:65px; margin-top:1px; margin-left:15px;">
                                        	 <div style="float:left; margin-right:6px;"><img src="<?=url_tmpl()?>icon/add-2-icon.png" width="12" height="12" /></div>
                                             <div style="float:left;margin-top:-1px;"><a href="login" class="dangtin"><span>Đăng tin</span></a></div>
                                             <fieldset class="dialog" id="listdangtin">
                                                 <div class="topdangtin">
                                                 	<div class="topdangtin_t">&nbsp;</div>
                                                    <div class="topdangtin_c">
                                                    	<div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Mua bán rao vặt</a></div>
                                                        </div>
                                                        <div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Đấu giá</a></div>
                                                        </div>
                                                        <div class="topdangtin_item">
                                                        	<div class="topdangtin_item_icon"></div>
                                                            <div class="topdangtin_item_content"><a class="text" href="#">Bất động sản</a></div>
                                                        </div>
                                                        <div id="both"></div>
                                                    </div>
                                                    <div class="topdangtin_u"></div>
                                                 </div>
                                              </fieldset>
                                      	</li>
                                    	<li class="icon_menu" style="margin-left:5px;"><a title="" href="#"><?=$datas['ten']?></a></li>
                                    	<li style="width:30px;"><img style="margin-top:-1px;" src="<?=base_url()?>files/thanhvien/<?=($imgs)?>" width="20" height="20" /></li>
                                    <?php endif?>
                                    </ul>
                                </div>
                   
<script type="text/javascript">
        $(document).ready(function() {
			//Thanh vien
            $(".signin").click(function(e) {          
				e.preventDefault();
                $("fieldset#signin_menu").toggle();
            });
			$("fieldset#signin_menu").mouseup(function() {
				return false
			});
			//Dang tin
			$(".dangtin").click(function(e) {          
				e.preventDefault();
                $("fieldset#listdangtin").toggle();
            });
			$("fieldset#listdangtin").mouseup(function() {
				return false
			});
			$(document).mouseup(function(e) {
				if($(e.target).parent("a.signin").length==0) {
					$("fieldset#signin_menu").hide();
				}
				if($(e.target).parent("a.dangtin").length==0) {
					$("fieldset#listdangtin").hide();
				}
			});			
			
        });
</script>